package demo08.Facade_pattern.entity;
/**
 * 调谐器实体类
 * */
public class Tuner {
	String description;//描述
	Amplifier amplifier;//扩音器
	double frequency;//频率

	public Tuner(String description, Amplifier amplifier) {
		this.description = description;
	}

	public void on() {
		System.out.println(description + " 打开");
	}

	public void off() {
		System.out.println(description + " 关闭");
	}

	public void setFrequency(double frequency) {
		System.out.println(description + " 设置频率 " + frequency);
		this.frequency = frequency;
	}

	public void setAm() {
		System.out.println(description + " 设置AM模式");
	}

	public void setFm() {
		System.out.println(description + " 设置FM模式");
	}

	public String toString() {
		return description;
	}

}
